#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import rospy
from pokemon_server.srv import Finish,FinishResponse

def finish_client():
	# ROS节点初始化
    rospy.init_node('finish_client')
    rospy.wait_for_service('/finish')
    try:
        finish_client = rospy.ServiceProxy('/finish', Finish)
		# 请求服务调用，输入请求数据
        response = finish_client(0)
        return response
    except rospy.ServiceException, e:
        print "Service call failed: %s"%e

if __name__ == "__main__":
	#服务调用并显示调用结果
    print(finish_client())


